using System;
using System.Collections.Generic;
using System.Text;
using IReaper.FileData;
using IReaper.Statues;
using System.ComponentModel;

namespace IReaper.Command
{
    class DownloadFileCommand : CommandBase
    {
        public override CommandFamily Family
        {
            get { return CommandFamily.Command_DownloadFile; }
        }

        public override void CommandBody(object sender, params object[] paras)
        {
            if (paras == null || paras.Length < 1)
                return;
            IList<CourseFileData> Files = paras[0] as IList<CourseFileData>;
            if (Files == null)
            {
                return;
            }
            DownloadFileWork work = new DownloadFileWork();
            work.Data = Files;
            BindBackgroundWorker(work);
            work.RunWorkerAsync();
        }
    }
}
